﻿using Bootstrap.Security;
using CpsyV2Web.DataAccess;
using Longbow.Security.Principal;
using System.Web;
using System.Linq;
using System.Collections.Generic;

namespace CpsyV2Web.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class HeaderBarModel : ModelBase
    {
        /// <summary>
        /// 
        /// </summary>
        public HeaderBarModel()
        {
            var user = BootstrapUser.RetrieveUserByUserName(HttpContext.Current.User.Identity.Name);

            UserName = user.UserName;
           LogoutUrl = DictHelper.RetrieveLogoutUrl();
        }
        /// <summary>
        /// 
        /// </summary>
        public string UserName { get; protected set; }
        /// <summary>
        /// 
        /// </summary>
        public string DisplayName { get; protected set; }
        /// <summary>
        /// 获得/设置 用户头像地址
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string LogoutUrl { get; set; }
        /// <summary>
        /// 获得/设置 消息数量
        /// </summary>
        public int NotisCount { get; set; }
    }
}